package com.platform.service.impl;

import com.platform.annotation.SysLog;
import com.platform.base.BaseService;
import com.platform.common.Const;
import com.platform.common.ServerResponse;
import com.platform.pojo.UsersHabits;
import com.platform.service.IUsersHabitsService;
import org.springframework.stereotype.Service;

/**
 * 搜索引擎查询记录服务层
 */
@Service("iUsersHabitsService")
public class UsersHabitsServiceImpl extends BaseService implements IUsersHabitsService {

    /**
     * 新增记录
     * @param usersHabits
     * @return
     */
    @SysLog("新增搜索记录")
    public ServerResponse<String> save(UsersHabits usersHabits){
        if(usersHabitsMapper.insert(usersHabits) > 0 ){
            return ServerResponse.createBySuccessMessage(Const.Msg.SAVESUCCESS);
        }
        return ServerResponse.createBySuccessMessage(Const.Msg.SAVEERROR);
    }

}
